﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="DocumentManagement.Views.BG.SearchResult" %>

<%@ Import Namespace="DocumentManagement.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
    <h2>
        报告搜索结果</h2>
    <table>
        <tr>
            <td>
                文件编号
            </td>
            <td>
                委托来源
            </td>
            <td>
                委托方
            </td>
            <td>
                项目座落
            </td>
            <td>
                报告状态
            </td>
            <td>
                评估总价
            </td>
            <td>
                评估单价
            </td>
            <td>
                估价作业人员
            </td>
            <td>
                评估完成日期
            </td>
            <td>
                报告附件
            </td>
            <td>
                相关联的预估单
            </td>
        </tr>
        <%foreach (var bg in this.Model.BGs)
          { %>
        <tr>
            <td>
                <a target="_blank" href="<%=this.Url.Action("ShowBaoGaoDetail", "baogao", new {id = bg.id}) %>">
                    <%=bg.wjbh %>
                </a>
            </td>
            <td>
                <%=bg.wtly%>
            </td>
            <td>
                <%=bg.wtf%>
            </td>
            <td>
                <%=bg.xmzl %>
            </td>
            <td>
                <%=Utility.GetEnumText((BaoGaoState) bg.state) %>
            </td>
            <td>
                <%=bg.pgzj %>
            </td>
            <td>
                <%=bg.pgdj %>
            </td>
            <td>
                <%=bg.gjzyry %>
            </td>
            <td>
                <%=bg.pgwchrq %>
            </td>
            <td>
                <%if (bg.hasAttachment)
                  { %>
                <a href="<%=this.Url.Action("DownloadBaoGaoAttachment", "BaoGao", new {id= bg.id})%>">
                    附件</a>
                <%} %>
            </td>
            <td>
            <%if (bg.YuGuDanReference.EntityKey != null)
              {%>
                <a target="_blank" href="<%=this.Url.Action("ShowYuGuDanDetail", "yugudan", new {id = bg.YuGuDanReference.EntityKey.GetKeyValueByName("id")}) %>">
                    关联的预估单
                </a>
                <%} %>
            </td>
        </tr>
        <%}%>
    </table>
</asp:Content>
